/*
 * @Author: xiawei 1243162387@qq.com
 * @Date: 2024-04-19 10:36:52
 * @LastEditors: xiawei 1243162387@qq.com
 * @LastEditTime: 2024-05-10 21:14:53
 */
import VMdPreview from '@kangc/v-md-editor/lib/preview';
import '@kangc/v-md-editor/lib/style/preview.css';
import githubTheme from '@kangc/v-md-editor/lib/theme/github.js';
import '@kangc/v-md-editor/lib/theme/style/github.css';

// 代码行号
import createLineNumbertPlugin from '@kangc/v-md-editor/lib/plugins/line-number/index';
// 快速复制代码
import createCopyCodePlugin from '@kangc/v-md-editor/lib/plugins/copy-code/index';
import '@kangc/v-md-editor/lib/plugins/copy-code/copy-code.css';

// highlightjs
import hljs from 'highlight.js/lib/core';
import javascript from 'highlight.js/lib/languages/javascript';
import xml from 'highlight.js/lib/languages/xml';
hljs.registerLanguage('javascript', javascript);
hljs.registerLanguage('xml', xml);
VMdPreview.use(githubTheme, {
  Hljs: hljs,
});


VMdPreview.use(createLineNumbertPlugin());
VMdPreview.use(createCopyCodePlugin());

export default VMdPreview